use super::*;

#[derive(Debug, Clone, Copy)]
pub struct Table<'a> {
	pub values: LazyArray16<'a, FWORD>,
}
impl<'a> Table<'a> {
	pub fn parse(data: &'a [u8]) -> Option<Self> {
		let count = data.len().checked_div(4)?;
		let count = u16::try_from(count).ok()?;
		let mut s = Stream::new(data);
		Some(Self {
			values: s.read_array16(count)?,
		})
	}
}
